package route

import (
	"ginWork/controller"
	"github.com/gin-gonic/gin"
)

func Route(r *gin.Engine) {
	r.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})

	r.POST("/create", controller.GoodsTake)
	r.GET("/list", controller.GoodsList)
	r.GET("/order", controller.GoodsOrder)
	r.GET("/order/case", controller.OrderType)
	r.GET("/find", controller.GoodsFind)
	r.GET("/shing", controller.GoodsTakeSho)

	r.POST("/image", controller.UploadOss)

	r.POST("/login", controller.UserLogin)
	r.POST("/add", controller.UserAdd)
}
